<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Add Sub User</title>
</head>
<script language="javascript">
function isEmpty()
{
	
	
	if((document.getElementById("usertext").value==0)&& (document.getElementById("passtext").value==0))
	   {
		alert("Fields cannot be left blank");
		document.AddUser.usertext.focus();
		return false;
	   }	
		
	if(document.getElementById("usertext").value==0)
		{
			alert("User Name cannot be left blank");
			document.AddUser.usertext.focus();	
			return false;
		}	
	if(document.getElementById("passtext").value==0)
		{
			alert("Password cannot be left blank");
			document.AddUser.passtext.focus();
			return false;
		}
	return true;
}

</script>
<body>
<center>
  <table width=90% >
	
	<tr>
 	<%@include file="Menu.jsp" %>
 	</tr>
 </table>
 <form name="AddUser" method="post" action="SaveNewUser" onsubmit="return isEmpty();">
 <table >
 
 	<tr>
 		<td> User Name</td>
 		<td><input type=text size=10 id="usertext" name="usertext" value=" "></input></td>
 	</tr>
 	<tr>
 		<td><font align=left>Password</font></td>
 		<td><input type=password size=10 id="passtext" name="passtext" value=" "></input></td>
 	</tr>
 	<tr>
		<td>User Type</td>
		<td><select id=userType name=userType>
				<option>Administrator</option>
				<option>User</option>
			</select>
		</td>
	</tr>
 	<tr>
 		<td><input type=submit value="Save"></input></td>
 		<td><input type=reset value=cancel></input></td>
 		<td>${message}</td>
 	</tr>
 </table>
 </form>

</body>
</html>